﻿@model IEnumerable<DFYE.Web.Models.studentDaily>
@using JULONG.WEB.Library
@using DFYE.Web.Models;
@{
    ViewBag.Title = "Index";
    student st = ViewBag.student as student;
}
@{
    ViewBag.Title = "文档";
    paging paging = new paging();
    paging.pageSize = 15;
    dynamic pagingMode;
    var vModel = paging.content(
        Model.OrderByDescending(d=>d.createDate),
        out pagingMode, Html.getRoute("page").As<int>()
        );
    ViewBag.paging = pagingMode;
}
<h2>@st.name 的日志</h2>

<p>
    @Html.ActionLink("新建", "Create/"+@st.ID)
</p>
<table>
    <tr>
        <th>
            类型
        </th>
        <th>
            标题
        </th>
        <th>
            有效性
        </th>
        <th>
            内容
        </th>
        <th>
            时间
        </th>
@*        <th>
            teacherID
        </th>
        <th>
            tearcherName
        </th>*@
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.studentDailyType.name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.able)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.content)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.createDate)
        </td>


@*        <td>
            @Html.DisplayFor(modelItem => item.teacherID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.tearcherName)
        </td>*@
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ID ,studentID = item.student.ID})
        </td>
    </tr>
}

</table>
@Html.Partial("paging", new { action = "Index" })